﻿import request from '/@/utils/request';
enum Api {
  AddShichang = '/api/shichang/add',
  DeleteShichang = '/api/shichang/delete',
  UpdateShichang = '/api/shichang/update',
  PageShichang = '/api/shichang/page',
  DetailShichang = '/api/shichang/detail',
  GetKaoshiKaoshiIdDropdown = '/api/shichang/KaoshiKaoshiIdDropdown',
  SaveShichang = '/api/shichang/save',
  AutoShichangRenshu = '/api/shichang/autoShichangRenshu',
  
}

// 增加试场
export const addShichang = (params?: any) =>
	request({
		url: Api.AddShichang,
		method: 'post',
		data: params,
	});

// 删除试场
export const deleteShichang = (params?: any) => 
	request({
			url: Api.DeleteShichang,
			method: 'post',
			data: params,
		});

// 编辑试场
export const updateShichang = (params?: any) => 
	request({
			url: Api.UpdateShichang,
			method: 'post',
			data: params,
		});

// 分页查询试场
export const pageShichang = (params?: any) => 
	request({
			url: Api.PageShichang,
			method: 'post',
			data: params,
		});

// 详情试场
export const detailShichang = (id: any) => 
	request({
			url: Api.DetailShichang,
			method: 'get',
			data: { id },
		});

export const getKaoshiKaoshiIdDropdown = () =>
		request({
		url: Api.GetKaoshiKaoshiIdDropdown,
		method: 'get'
		});

export const saveShichang = (params?: any) => 
		request({
			url: Api.SaveShichang,
			method: 'post',
			data: params,
		});

export const autoShichangRenshu = (params?: any) => 
		request({
			url: Api.AutoShichangRenshu,
			method: 'post',
			data: params,
		});
		